Repository navigation
Conversation
11 of 21 tasks
…ne#6175) Keep task-store latency outside the session critical section. Register queued commits before processing so registration failures preserve recovery work and ordinary Phase-2 failures retain their terminal outcome. (cherry picked from commit 7c34e43) Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
qin-ptr
force-pushed
the
fix/session-task-registration-lock
branch
from
October 16, 2026 11:18
61245c8 to
7bfc0a3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
从已合入 main 的 #6175 回补提交
7c34e43c53757d35644ce8d2eb31c4c99e057749。commit 在持有 session 锁时等待 TaskStore 查询和创建记录,会把任务存储延迟扩散到同一 session 的删除操作。
Before: 同一 session 的 commit 卡在 TaskStore.create 时,DELETE 因目录树锁冲突返回 409。
After: 先完成归档、入队和 ready 发布并解锁,再等待任务登记。相同场景下 DELETE 可以返回 200;commit 仍需等任务登记成功后才返回 accepted。
登记失败不回滚已发布的归档,错误 details 保留
task_id、archive_uri、archived=true和stage=task_tracker_create。Human Involvement
Related Issue
无关联 Issue。
Type of Change
Changes Made
Testing
17 项聚焦测试通过,包含
test_fail_task、test_phase1_publishes_and_unlocks_before_task_registration、test_session_commit_resume.py和test_session_commit_processor_identity.py。仅修改已有测试,未新增测试文件、函数或参数化 Case;相对回补基线,测试代码净增 0 行。真实存储与 native 锁复现确认:TaskStore 查询或创建阻塞期间删除成功;登记失败保留 ready 归档和队列消息。Ruff 和
git diff --check通过。Checklist
Screenshots (if applicable)
不适用。
Additional Notes
回补到
codex/v0.4.20-hotfix-work,适配旧分支的队列回调接口;消费者失败契约由已有 TaskTracker 测试覆盖。生产代码净增 13 行、测试净增 0 行;队列入队仍在 session 锁内,本次不调整可靠投递协议。